package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 退款表
 * @TableName t_refund
 */
@Data
public class Refund implements Serializable {
    /**
     * 退款表编号
     */
    private Integer refId;

    /**
     * 申诉表编号
     */
    private Integer apId;

    /**
     * 退款金额
     */
    private BigDecimal refAmount;

    /**
     * 退款时间
     */
    private Date refTime;

    /**
     * 售后状态:
     */
    private Integer refStatus;

    /**
     * 预留varchar字段
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Refund other = (Refund) that;
        return (this.getRefId() == null ? other.getRefId() == null : this.getRefId().equals(other.getRefId()))
            && (this.getApId() == null ? other.getApId() == null : this.getApId().equals(other.getApId()))
            && (this.getRefAmount() == null ? other.getRefAmount() == null : this.getRefAmount().equals(other.getRefAmount()))
            && (this.getRefTime() == null ? other.getRefTime() == null : this.getRefTime().equals(other.getRefTime()))
            && (this.getRefStatus() == null ? other.getRefStatus() == null : this.getRefStatus().equals(other.getRefStatus()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRefId() == null) ? 0 : getRefId().hashCode());
        result = prime * result + ((getApId() == null) ? 0 : getApId().hashCode());
        result = prime * result + ((getRefAmount() == null) ? 0 : getRefAmount().hashCode());
        result = prime * result + ((getRefTime() == null) ? 0 : getRefTime().hashCode());
        result = prime * result + ((getRefStatus() == null) ? 0 : getRefStatus().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", refId=").append(refId);
        sb.append(", apId=").append(apId);
        sb.append(", refAmount=").append(refAmount);
        sb.append(", refTime=").append(refTime);
        sb.append(", refStatus=").append(refStatus);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}